#include "editgraphicsobjectwidget.h"
#include "ui_editgraphicsobjectwidget.h"
#include "../collisionshapeseditor.h"

EditGraphicsObjectWidget::EditGraphicsObjectWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::EditGraphicsObjectWidget)
{
    ui->setupUi(this);

    connect(ui->pushButtonEditCollisionShapes, SIGNAL(clicked()),
            this, SLOT(activateCollisionShapesEditor()));
}

EditGraphicsObjectWidget::~EditGraphicsObjectWidget()
{
    delete ui;
}

void EditGraphicsObjectWidget::activateCollisionShapesEditor()
{
    CollisionShapesEditor editor(this);
    editor.exec();
}

void EditGraphicsObjectWidget::enableEditCollisionShapes(bool bEnable)
{
    ui->pushButtonEditCollisionShapes->setEnabled(bEnable);
}
